//package cn.com.config;
//
//import cn.com.interceptor.SysInterceptor;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//@Configuration
//public class SessionConfiguration implements WebMvcConfigurer {
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        SysInterceptor sysInterceptor = new SysInterceptor();
//        InterceptorRegistration interceptorRegistration = registry.addInterceptor(sysInterceptor);
//        //添加对用户是否登录的拦截器，并添加过滤项、排除项
//
//        interceptorRegistration.addPathPatterns("/user/userinfo");
//        interceptorRegistration.addPathPatterns("/user/occupation");
//        interceptorRegistration.excludePathPatterns("/user/login");//排除
//        interceptorRegistration.excludePathPatterns("/user/register");//排除
//
//        interceptorRegistration.excludePathPatterns("/**/css/**","/**/js/**","/**/images/**","/**/files/**");//排除样式、脚本、图片等资源文件
//    }
//
//}
